package com.sright.bcard.content.biz.manager.strategy;

import com.sright.bcard.common.service.share.dto.content.CardDTO;
import com.sright.bcard.common.service.share.dto.content.CardFullDTO;

/**
 * 策略上下文
 */
public class Context {

    //持有一个具体策略的对象
    private Strategy strategy;

    /**
     * 构造函数，传入一个具体策略对象
     * @param strategy  具体策略对象
     */
    public Context(Strategy strategy){
        this.strategy = strategy;
    }

    /**
     * 策略方法
     */
    public CardFullDTO contextInterface(CardDTO cardDTO){
        CardFullDTO cardFullDTO = strategy.strategyInterface(cardDTO);
        return cardFullDTO;
    }

}
